﻿namespace Shop.Core.Share
{
    /// <summary>
    /// 用户信息
    /// </summary>
    public interface IUserContext
    {
        string Name { get; set; }

        string RemoteIpAddress { get; set; }

        long Id { get; set; }
    }

    /// <summary>
    /// 用户信息
    /// </summary>
    public class UserContext : IUserContext
    {
        /// <summary>
        /// 用户名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 请求IP
        /// </summary>
        public string RemoteIpAddress { get; set; }

        /// <summary>
        /// 用户Id
        /// </summary>
        public long Id { get; set; }
    }
}
